package com.wfb.service.impl;

import com.wfb.bean.ImgContext;
import com.wfb.mapper.ImgContextMapper;
import com.wfb.service.ImgContextService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ImgContextServiceImpl implements ImgContextService {
    @Autowired
    private ImgContextMapper imgContextMapper;

    /***
     * 查询所有
     * @return
     */
    @Override
    public List<ImgContext> find() {
        return imgContextMapper.find();
    }

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    @Override
    public String findIconByid(int id) {
        return imgContextMapper.findIconByid(id);
    }

    /***
     * 添加新图片
     * @param imgContext
     * @return
     */
    @Override
    public int add(ImgContext imgContext) {
        return imgContextMapper.add(imgContext);
    }

    /**
     * 删除
     *
     * @param id
     * @return
     */
    @Override
    public int remove(int id) {
        return imgContextMapper.remove(id);
    }
}
